<!doctype html>
<html>
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>Hello APP</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/common.css" />
  	<link rel="stylesheet" type="text/css" href="../../css/aui.css" />

    <style>

     /* 头部样式 */
     #header_top {
         background-color: #2997e4;
         padding-top: 25px;
     }

     /* 底部切换按钮样式 */
     ul {display: -webkit-box; display: -webkit-flex; display: flex; }
     .aui-title {color: #fff;}
    </style>
  </head>
  <body>
    <div id="wrap">
      <!-- 第三头部 -->
      <!-- <div id="header" class="titlebar">
        <div class="topbar whitebar">
          <div class="back"  tapmode="" onclick="goback()"><img src="../../image/ic_back_u.png" alt=""></div>
          <div class="title" id="title">通用设置</div>
        </div>
      </div> -->
      <header id="header_top" class="aui-bar aui-bar-nav" >

        <a class="aui-pull-left"  onclick="goback()">
            <span class="aui-iconfont aui-icon-left"></span>
        </a>
        <div class="aui-title" id="title">详情</div>
    			<!-- <a class="aui-pull-right" onclick="openSearch()">
    	        <span class="aui-iconfont aui-icon-search"></span>
    	    </a> -->
    	</header>
    </div>
  </body>
  <script type="text/javascript" src="../../script/api.js"></script>
  <script type="text/javascript">
    function goback () {
      api.closeWin({name:api.pageParam.name});
    }

    // 完成首页初始化
    apiready = function(){
      var header_top = $api.byId('header_top');
      $api.fixStatusBar(header_top);
      var header_topPos = $api.offset(header_top);

      var type = api.pageParam.name;
      var id = api.pageParam.id;


        $api.byId('title').innerHTML = api.pageParam.title;
        // alert(api.pageParam.title)
        api.openFrame ({
    			  reload:true,
            name: 'five_' + type,
            url: './' + type + '.html',
            pageParam: {
              id: id
            },
            rect:{
                x:0,
                y:header_topPos.h,
                w:'auto',
                h:api.frameHeight - header_topPos.h
            },
            bounces: false,
            delay:200
        });
    };
  </script>
</html>
